from pydantic import BaseModel
from typing import Optional


class TermCreate(BaseModel):
    term_chinese: str
    term_lisu: str
    term_vietnamese: Optional[str] = None
    term_laowu: Optional[str] = None
    term_miandian: Optional[str] = None


class TermOut(BaseModel):
    id: int
    term_chinese: str
    term_lisu: str
    term_vietnamese: Optional[str] = None
    term_laowu: Optional[str] = None
    term_miandian: Optional[str] = None
    created_at: Optional[str] = None
    updated_at: Optional[str] = None

    class Config:
        from_attributes = True








